<?php
if (!defined('BASEPATH')) exit('No direct script access allowed');
?>

<!-- JavaScript -->
<script type="text/javascript" src="<?= base_url() ?>js/wufoo.js"></script>
<!-- CSS -->
<link rel="stylesheet" type="text/css" href="<?= base_url() ?>css/form/form.css" media="screen, tv, projection" title="Default" />
<link rel="stylesheet" type="text/css" href="<?php echo base_url() ?>css/datepicker.css" media="screen, tv, projection" title="Default" />
<script type="text/javascript" src="<?= base_url() ?>js/datepicker.js"></script>

<div id="container">
	<?
    //Setting Awal Value Jika Prosedur yang dilakukan adalah prosedur input biasa.
	$value = array(
		'id_kecamatan'			=> "",
		'kecamatan'				=> "",
		'legend'			=> "Form Input Kecamatan",
		'info'				=> "Form entri data kecamatan",
		'act_form'			=> "kecamatan/input_kecamatan/"
	);
	
	//Setting Value pada form Jika melakukan prosedur Edit terhadap data tertentu.
	if($status == "edit"){
		foreach($kecamatan->result() as $row){
			$value['id_kecamatan'] = $row->IDKECAMATAN;
			$value['kecamatan'] = $row->NAMA_KECAMATAN;
		}
		$value['legend'] = "Form Edit Kecamatan";
		$value['info'] = "Form ubah data kecamatan";
		$value['act_form'] = "kecamatan/edit_kecamatan/".$value['id_kecamatan'];
	}//end if
	
	?>
	<?= form_open($value["act_form"],'class="wufoo" name="form_kecamatan"'); ?>
	<fieldset class="fieldset">
	<legend class="legend">
		<?= $value["legend"] ?> |
	</legend>
	
	<!-- <div class="info">
		<div><?= $value["info"] ?></div>
	</div> -->
	<div class="info">
		<?= anchor(site_url('kecamatan'),img(array('src'=>'images/main/left.png','border'=>'0','alt'=>'')).'Kembali ke daftar kecamatan','Menampilkan halaman Daftar Kecamatan'); ?>
	</div>
 <!-- Konten -------------------------------------------------------------------------->
 <div id="contentform">
	<ul>
        <li>
			<label class="desc">Kecamatan *</label>
			<div>
				<textarea class="new field" type="text" name="kecamatan" ><? if(set_value('kecamatan')!='') echo set_value('kecamatan'); else echo $value['kecamatan'];?></textarea>
               
			</div>
			<p class="instruct">
				Masukkan Kecamatan pada Kolom ini.			
			</p>
		</li>
		<?php echo form_error('kecamatan'); ?>
				
		<li class="buttons">
		  <input id="submit" type="submit" value="Simpan" />
		  <input id="reset" type="reset" value="Reset" />
		</li>
	</ul>
</div>
</fieldset>
<?= form_close(); ?>
</form>
</div><!--container-->